Skip to content

fix(cli): warn on stale warehouse reports in portfolio truth mode#54

Merged
saagpatel merged 1 commit into
mainfrom
fix/f2-warehouse-staleness-reminder
Jun 7, 2026
Merged

fix(cli): warn on stale warehouse reports in portfolio truth mode#54
saagpatel merged 1 commit into
mainfrom
fix/f2-warehouse-staleness-reminder

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

Summary

  • warn during audit report --portfolio-truth when the latest warehouse audit report is missing or stale
  • include the remediation command so the dual truth artifacts do not silently drift
  • cover missing, stale, and fresh warehouse report cases

Verification

  • .venv/bin/python -m pytest -q -p no:cacheprovider tests/test_portfolio_truth.py
  • .venv/bin/ruff check src/ tests/

…h mode (F2)

Per the F2 decision (keep both truth artifacts live), surface the dual-artifact
liveness gap at generation time. `audit report --portfolio-truth` dispatches to
_run_portfolio_truth_mode, which scans the workspace and publishes
portfolio-truth-latest.json but never regenerates the legacy
audit-report-<username>-*.json warehouse file — and it can't cheaply, since the truth
pipeline doesn't run the GitHub audit that produces warehouse data. Notion OS's
external-signal-sync reads that warehouse file, so it silently goes stale (live:
06-03 vs truth 06-07).

Add _warn_if_warehouse_report_stale: after publishing truth, warn (with the exact
remediation command) when the newest warehouse report is missing or older than
WAREHOUSE_REPORT_STALE_DAYS (7). Self-announcing every truth run, so the gap can't
rot unnoticed; complements the cross-system-smoke C2 check that catches it at smoke
time. Tests cover missing / stale / fresh. 46 portfolio-truth tests pass, ruff clean,
no new mypy errors.
@saagpatel saagpatel merged commit acff78e into main Jun 7, 2026
3 checks passed
@saagpatel saagpatel deleted the fix/f2-warehouse-staleness-reminder branch June 7, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant